//
//  RootTabBarViewController.m
//  
//
//  Created by lanou3g on 15/9/18.
//
//

#import "RootTabBarViewController.h"
#import "PlayViewController.h"
#import "SectionViewController.h"
#import "MyViewController.h"

@interface RootTabBarViewController ()

@end

@implementation RootTabBarViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setUpChildController];
}

#pragma mark 配置tabBar
-(void)setUpChildController
{
    PlayViewController * activityVC = [[PlayViewController alloc] init];
    UINavigationController * activityNC = [[UINavigationController alloc] initWithRootViewController:activityVC];
    
    SectionViewController * movieVC = [[SectionViewController alloc] init];
    UINavigationController * movieNC = [[UINavigationController alloc] initWithRootViewController:movieVC];
    
    MyViewController * cinemaVC = [[MyViewController alloc] init];
    UINavigationController * cinemaNC = [[UINavigationController alloc] initWithRootViewController:cinemaVC];
    
   
    
    self.viewControllers = @[activityNC,movieNC,cinemaNC];

    activityNC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"趣玩" image:[UIImage imageNamed:@"shoucanghui"] tag:100];
    movieNC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"收藏" image:[UIImage imageNamed:@"wanhui"] tag:101];
    cinemaNC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"我的" image:[UIImage imageNamed:@"wohui"] tag:102];
   
    
    [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"导航栏.jpg"] forBarMetrics:UIBarMetricsDefault];
}

@end
